#include <iostream>

using std::cout;
using std::endl;

void test()
{
    //[]捕获列表,捕获外部变量
    //()函数的参数列表
    //{}函数的函数体
    int a = 10;
    /* [&a](int value){ */
    [a](int value)mutable{
        ++a;
        cout << "a === " << a << endl;
        ++value;
        cout << "value = " << value << endl;
    }(200);

    cout << "a = " << a << endl;
}

int main(int argc, char *argv[])
{
    test();
    return 0;
}

